<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>kalman-cpp: EKF Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">kalman-cpp
   </div>
   <div id="projectbrief">Implementation of Kalman Filter in C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_e_k_f.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_e_k_f-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">EKF Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Implemetation of the extended Kalman filter. This class needs to be derived.  
 <a href="class_e_k_f.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ekf_8h_source.html">ekf.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab48b75de3b276773f474e347ebc5b2a0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#ab48b75de3b276773f474e347ebc5b2a0">EKF</a> ()</td></tr>
<tr class="memdesc:ab48b75de3b276773f474e347ebc5b2a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, nothing happens here.  <a href="class_e_k_f.html#ab48b75de3b276773f474e347ebc5b2a0">More...</a><br /></td></tr>
<tr class="separator:ab48b75de3b276773f474e347ebc5b2a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abebda258b361ad3ceb05a70ae453baec"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#abebda258b361ad3ceb05a70ae453baec">~EKF</a> ()</td></tr>
<tr class="memdesc:abebda258b361ad3ceb05a70ae453baec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructur, nothing happens here.  <a href="class_e_k_f.html#abebda258b361ad3ceb05a70ae453baec">More...</a><br /></td></tr>
<tr class="separator:abebda258b361ad3ceb05a70ae453baec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d8af910c1a469ff5f4d5feaa9a24258"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a9d8af910c1a469ff5f4d5feaa9a24258">InitSystem</a> (int n_states, int n_outputs, const mat &amp;Q, const mat &amp;R)</td></tr>
<tr class="memdesc:a9d8af910c1a469ff5f4d5feaa9a24258"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell me how many states and outputs you have!  <a href="class_e_k_f.html#a9d8af910c1a469ff5f4d5feaa9a24258">More...</a><br /></td></tr>
<tr class="separator:a9d8af910c1a469ff5f4d5feaa9a24258"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c084d493687d9ad0cf55d8c97c22633"><td class="memItemLeft" align="right" valign="top">virtual colvec&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a6c084d493687d9ad0cf55d8c97c22633">f</a> (const colvec &amp;x, const colvec &amp;u)</td></tr>
<tr class="memdesc:a6c084d493687d9ad0cf55d8c97c22633"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define model of your system.  <a href="class_e_k_f.html#a6c084d493687d9ad0cf55d8c97c22633">More...</a><br /></td></tr>
<tr class="separator:a6c084d493687d9ad0cf55d8c97c22633"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb8638938ff97e5839e02f24860243e5"><td class="memItemLeft" align="right" valign="top">virtual colvec&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#acb8638938ff97e5839e02f24860243e5">h</a> (const colvec &amp;x)</td></tr>
<tr class="memdesc:acb8638938ff97e5839e02f24860243e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define the output model of your system.  <a href="class_e_k_f.html#acb8638938ff97e5839e02f24860243e5">More...</a><br /></td></tr>
<tr class="separator:acb8638938ff97e5839e02f24860243e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d44ac37102771fa49824b073a532670"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a4d44ac37102771fa49824b073a532670">InitSystemState</a> (const colvec &amp;x0)</td></tr>
<tr class="memdesc:a4d44ac37102771fa49824b073a532670"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the system states. Must be called after InitSystem. If not called, system state is initialized to zero.  <a href="class_e_k_f.html#a4d44ac37102771fa49824b073a532670">More...</a><br /></td></tr>
<tr class="separator:a4d44ac37102771fa49824b073a532670"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55196ac6b48e2ded166834a0c1df53cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a55196ac6b48e2ded166834a0c1df53cf">InitSystemStateCovariance</a> (const mat &amp;P0)</td></tr>
<tr class="memdesc:a55196ac6b48e2ded166834a0c1df53cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the system state covariance. Must be called after InitSystem. If not called, state covariance is initialized to an identity matrix.  <a href="class_e_k_f.html#a55196ac6b48e2ded166834a0c1df53cf">More...</a><br /></td></tr>
<tr class="separator:a55196ac6b48e2ded166834a0c1df53cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a135d2b0e0132492693fd5c6ebe650893"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a135d2b0e0132492693fd5c6ebe650893">EKalmanf</a> (const colvec &amp;u)</td></tr>
<tr class="memdesc:a135d2b0e0132492693fd5c6ebe650893"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do the extended Kalman iteration step-by-step while simulating the system. Simulating the system is done to calculate system states and outputs.  <a href="class_e_k_f.html#a135d2b0e0132492693fd5c6ebe650893">More...</a><br /></td></tr>
<tr class="separator:a135d2b0e0132492693fd5c6ebe650893"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a5e367c077e87c46c63368e5a3fffa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#aa8a5e367c077e87c46c63368e5a3fffa">EKalmanf</a> (const colvec &amp;z, const colvec &amp;u)</td></tr>
<tr class="memdesc:aa8a5e367c077e87c46c63368e5a3fffa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do the extended Kalman iteration step-by-step without simulating the system. Use this if measurement is available and simulating the system is unnecessary. Here, true system states and system outputs do not matter. The only thing that matters is the estimated states.  <a href="class_e_k_f.html#aa8a5e367c077e87c46c63368e5a3fffa">More...</a><br /></td></tr>
<tr class="separator:aa8a5e367c077e87c46c63368e5a3fffa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1efb20e6f88cf39cc80d8c83bb41ae5"><td class="memItemLeft" align="right" valign="top">colvec *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#af1efb20e6f88cf39cc80d8c83bb41ae5">GetCurrentState</a> ()</td></tr>
<tr class="memdesc:af1efb20e6f88cf39cc80d8c83bb41ae5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current simulated true state.  <a href="class_e_k_f.html#af1efb20e6f88cf39cc80d8c83bb41ae5">More...</a><br /></td></tr>
<tr class="separator:af1efb20e6f88cf39cc80d8c83bb41ae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ff98a83a909c1a73e7c54fb6bed9c4c"><td class="memItemLeft" align="right" valign="top">colvec *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a8ff98a83a909c1a73e7c54fb6bed9c4c">GetCurrentOutput</a> ()</td></tr>
<tr class="memdesc:a8ff98a83a909c1a73e7c54fb6bed9c4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current simulated true output. This is analogous to the measurements.  <a href="class_e_k_f.html#a8ff98a83a909c1a73e7c54fb6bed9c4c">More...</a><br /></td></tr>
<tr class="separator:a8ff98a83a909c1a73e7c54fb6bed9c4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8dcb50f6cd1dcaa313c8e90706c5dca"><td class="memItemLeft" align="right" valign="top">colvec *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#ad8dcb50f6cd1dcaa313c8e90706c5dca">GetCurrentEstimatedState</a> ()</td></tr>
<tr class="memdesc:ad8dcb50f6cd1dcaa313c8e90706c5dca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current estimated state. This is analogous to the filtered measurements.  <a href="class_e_k_f.html#ad8dcb50f6cd1dcaa313c8e90706c5dca">More...</a><br /></td></tr>
<tr class="separator:ad8dcb50f6cd1dcaa313c8e90706c5dca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12968bc0cfc1e2ff922afedce318dd7b"><td class="memItemLeft" align="right" valign="top">colvec *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a12968bc0cfc1e2ff922afedce318dd7b">GetCurrentEstimatedOutput</a> ()</td></tr>
<tr class="memdesc:a12968bc0cfc1e2ff922afedce318dd7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current estimated output.  <a href="class_e_k_f.html#a12968bc0cfc1e2ff922afedce318dd7b">More...</a><br /></td></tr>
<tr class="separator:a12968bc0cfc1e2ff922afedce318dd7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ae27fd423477a96fd15665ae15a5e55e5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#ae27fd423477a96fd15665ae15a5e55e5">nStates_</a></td></tr>
<tr class="memdesc:ae27fd423477a96fd15665ae15a5e55e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of the states.  <a href="class_e_k_f.html#ae27fd423477a96fd15665ae15a5e55e5">More...</a><br /></td></tr>
<tr class="separator:ae27fd423477a96fd15665ae15a5e55e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8902f8ab6a6a8d46524e2a501716d09e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a8902f8ab6a6a8d46524e2a501716d09e">nOutputs_</a></td></tr>
<tr class="memdesc:a8902f8ab6a6a8d46524e2a501716d09e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of outputs.  <a href="class_e_k_f.html#a8902f8ab6a6a8d46524e2a501716d09e">More...</a><br /></td></tr>
<tr class="separator:a8902f8ab6a6a8d46524e2a501716d09e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a262cd1dead985261fa576cf4ca7721ff"><td class="memItemLeft" align="right" valign="top">colvec&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a262cd1dead985261fa576cf4ca7721ff">x_</a></td></tr>
<tr class="memdesc:a262cd1dead985261fa576cf4ca7721ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">State vector.  <a href="class_e_k_f.html#a262cd1dead985261fa576cf4ca7721ff">More...</a><br /></td></tr>
<tr class="separator:a262cd1dead985261fa576cf4ca7721ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4faca49ecd115b274373579090514fcc"><td class="memItemLeft" align="right" valign="top">colvec&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_e_k_f.html#a4faca49ecd115b274373579090514fcc">z_</a></td></tr>
<tr class="memdesc:a4faca49ecd115b274373579090514fcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output matrix.  <a href="class_e_k_f.html#a4faca49ecd115b274373579090514fcc">More...</a><br /></td></tr>
<tr class="separator:a4faca49ecd115b274373579090514fcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implemetation of the extended Kalman filter. This class needs to be derived. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab48b75de3b276773f474e347ebc5b2a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab48b75de3b276773f474e347ebc5b2a0">&#9670;&nbsp;</a></span>EKF()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EKF::EKF </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor, nothing happens here. </p>

</div>
</div>
<a id="abebda258b361ad3ceb05a70ae453baec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abebda258b361ad3ceb05a70ae453baec">&#9670;&nbsp;</a></span>~EKF()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EKF::~EKF </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructur, nothing happens here. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a135d2b0e0132492693fd5c6ebe650893"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a135d2b0e0132492693fd5c6ebe650893">&#9670;&nbsp;</a></span>EKalmanf() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EKF::EKalmanf </td>
          <td>(</td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>u</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Do the extended Kalman iteration step-by-step while simulating the system. Simulating the system is done to calculate system states and outputs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">u</td><td>The applied input to the system </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa8a5e367c077e87c46c63368e5a3fffa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8a5e367c077e87c46c63368e5a3fffa">&#9670;&nbsp;</a></span>EKalmanf() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EKF::EKalmanf </td>
          <td>(</td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>u</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Do the extended Kalman iteration step-by-step without simulating the system. Use this if measurement is available and simulating the system is unnecessary. Here, true system states and system outputs do not matter. The only thing that matters is the estimated states. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">z</td><td>The measurement outputs, this is a returned value </td></tr>
    <tr><td class="paramname">u</td><td>The applied input to the system </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6c084d493687d9ad0cf55d8c97c22633"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c084d493687d9ad0cf55d8c97c22633">&#9670;&nbsp;</a></span>f()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">colvec EKF::f </td>
          <td>(</td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>u</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Define model of your system. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>System states </td></tr>
    <tr><td class="paramname">u</td><td>System inputs </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a12968bc0cfc1e2ff922afedce318dd7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12968bc0cfc1e2ff922afedce318dd7b">&#9670;&nbsp;</a></span>GetCurrentEstimatedOutput()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">colvec * EKF::GetCurrentEstimatedOutput </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current estimated output. </p>
<dl class="section return"><dt>Returns</dt><dd>Current estimated output \(\hat{z}_k\) </dd></dl>

</div>
</div>
<a id="ad8dcb50f6cd1dcaa313c8e90706c5dca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8dcb50f6cd1dcaa313c8e90706c5dca">&#9670;&nbsp;</a></span>GetCurrentEstimatedState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">colvec * EKF::GetCurrentEstimatedState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current estimated state. This is analogous to the filtered measurements. </p>
<dl class="section return"><dt>Returns</dt><dd>Current estimated state \(\hat{x}_k\) </dd></dl>

</div>
</div>
<a id="a8ff98a83a909c1a73e7c54fb6bed9c4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ff98a83a909c1a73e7c54fb6bed9c4c">&#9670;&nbsp;</a></span>GetCurrentOutput()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">colvec * EKF::GetCurrentOutput </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current simulated true output. This is analogous to the measurements. </p>
<dl class="section return"><dt>Returns</dt><dd>Current simulated output \(z_k\) </dd></dl>

</div>
</div>
<a id="af1efb20e6f88cf39cc80d8c83bb41ae5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1efb20e6f88cf39cc80d8c83bb41ae5">&#9670;&nbsp;</a></span>GetCurrentState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">colvec * EKF::GetCurrentState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current simulated true state. </p>
<dl class="section return"><dt>Returns</dt><dd>Current simulated state of the system \(x_k\) </dd></dl>

</div>
</div>
<a id="acb8638938ff97e5839e02f24860243e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb8638938ff97e5839e02f24860243e5">&#9670;&nbsp;</a></span>h()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">colvec EKF::h </td>
          <td>(</td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Define the output model of your system. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>System states </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9d8af910c1a469ff5f4d5feaa9a24258"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d8af910c1a469ff5f4d5feaa9a24258">&#9670;&nbsp;</a></span>InitSystem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EKF::InitSystem </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n_states</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n_outputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const mat &amp;&#160;</td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const mat &amp;&#160;</td>
          <td class="paramname"><em>R</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tell me how many states and outputs you have! </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n_states</td><td>Number of the elements on the input vector x </td></tr>
    <tr><td class="paramname">n_outputs</td><td>Number of the elements on the otput vector z </td></tr>
    <tr><td class="paramname">Q</td><td>Process noise covariance </td></tr>
    <tr><td class="paramname">R</td><td>Measurement noise covariance </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4d44ac37102771fa49824b073a532670"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d44ac37102771fa49824b073a532670">&#9670;&nbsp;</a></span>InitSystemState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EKF::InitSystemState </td>
          <td>(</td>
          <td class="paramtype">const colvec &amp;&#160;</td>
          <td class="paramname"><em>x0</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the system states. Must be called after InitSystem. If not called, system state is initialized to zero. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x0</td><td>Inital value for the system state </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a55196ac6b48e2ded166834a0c1df53cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55196ac6b48e2ded166834a0c1df53cf">&#9670;&nbsp;</a></span>InitSystemStateCovariance()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EKF::InitSystemStateCovariance </td>
          <td>(</td>
          <td class="paramtype">const mat &amp;&#160;</td>
          <td class="paramname"><em>P0</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the system state covariance. Must be called after InitSystem. If not called, state covariance is initialized to an identity matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">P0</td><td>Inital value for the state covariance </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a8902f8ab6a6a8d46524e2a501716d09e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8902f8ab6a6a8d46524e2a501716d09e">&#9670;&nbsp;</a></span>nOutputs_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int EKF::nOutputs_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Number of outputs. </p>

</div>
</div>
<a id="ae27fd423477a96fd15665ae15a5e55e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae27fd423477a96fd15665ae15a5e55e5">&#9670;&nbsp;</a></span>nStates_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int EKF::nStates_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Number of the states. </p>

</div>
</div>
<a id="a262cd1dead985261fa576cf4ca7721ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a262cd1dead985261fa576cf4ca7721ff">&#9670;&nbsp;</a></span>x_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">colvec EKF::x_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>State vector. </p>

</div>
</div>
<a id="a4faca49ecd115b274373579090514fcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4faca49ecd115b274373579090514fcc">&#9670;&nbsp;</a></span>z_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">colvec EKF::z_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Output matrix. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>kalman/<a class="el" href="ekf_8h_source.html">ekf.h</a></li>
<li>kalman/<a class="el" href="ekf_8cpp.html">ekf.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_e_k_f.html">EKF</a></li>
    <li class="footer">Generated on Thu Apr 1 2021 04:15:37 for kalman-cpp by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
  </ul>
</div>
</body>
</html>
